package com.ruoyi.mapper;


import com.ruoyi.pojo.Goods;
import com.ruoyi.pojo.Type;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodMapper {
    List<Type> getAllType();

    List<Goods> getGoodsByType(@Param("id") String id,@Param("storeId") String storeId);

    int addGodd(@Param("name") String name,@Param("price") String price,@Param("remark") String remark,
                @Param("typeId") String typeId,@Param("image") String image,@Param("storeId") String storeId);

    int editGood(@Param("storeId") String storeId,@Param("id") String id,@Param("name") String name,@Param("price") String price,@Param("remark") String remark,
                 @Param("typeId") String typeId,@Param("image") String image);

    int deleteGood(@Param("storeId") String storeId,@Param("id") String id);

    int addClass(@Param("name") String name,@Param("image") String image);

    int editClass(@Param("id") String id,@Param("name") String name,@Param("image") String image);

    int deleteClass(@Param("id") String id);

    List<Goods> searchGood(@Param("storeId") String storeId,@Param("name") String name);
}
